package com.chixing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author shy
 * @since 2022-10-20
 */

@Document(indexName = "mycar")

public class CarES{

    private static final long serialVersionUID = 1L;

    @Id
    private Integer carId;

    @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_max_word")//设置为text  可以分词
    private String carName;

    @Field(type = FieldType.Auto)//自动检测类型
    private Float carPrice;

    @Field(type = FieldType.Auto)//自动检测类型
    private Integer carImgId;

    @Field(type = FieldType.Auto)
    private Integer cayTypeId;

    @Field(type = FieldType.Auto)
    private String carColor;

    @Field(type = FieldType.Auto)
    private Integer carCardId;

    @Field(type = FieldType.Auto)
    private Integer carStatus;

    @Field(type = FieldType.Auto)
    private Float carDisplacement;

    @Field(type = FieldType.Auto)
    private Integer carSeat;

    @Field(type = FieldType.Auto)
    private String carCase;
    @Field(type = FieldType.Auto)
    private String carCharger;

    @Field(type = FieldType.Auto)
    private LocalDateTime createtime;

    @Field(type = FieldType.Auto)
    private LocalDateTime updatetime;

    @Field(type = FieldType.Auto)
    private Integer version;

    @Field(type = FieldType.Auto)
    private String other1;

    @Field(type = FieldType.Auto)
    private String other2;

    public CarES(Integer carId, String carName, Float carPrice, Integer carImgId, Integer cayTypeId, String carColor, Integer carCardId, Integer carStatus, Float carDisplacement, Integer carSeat, String carCase, String carCharger, LocalDateTime createtime, LocalDateTime updatetime, Integer version, String other1, String other2) {
        this.carId = carId;
        this.carName = carName;
        this.carPrice = carPrice;
        this.carImgId = carImgId;
        this.cayTypeId = cayTypeId;
        this.carColor = carColor;
        this.carCardId = carCardId;
        this.carStatus = carStatus;
        this.carDisplacement = carDisplacement;
        this.carSeat = carSeat;
        this.carCase = carCase;
        this.carCharger = carCharger;
        this.createtime = createtime;
        this.updatetime = updatetime;
        this.version = version;
        this.other1 = other1;
        this.other2 = other2;
    }

    public CarES(){}
    public Integer getCarId() {
        return carId;
    }

    public void setCarId(Integer carId) {
        this.carId = carId;
    }
    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }
    public Float getCarPrice() {
        return carPrice;
    }

    public void setCarPrice(Float carPrice) {
        this.carPrice = carPrice;
    }
    public Integer getCarImgId() {
        return carImgId;
    }

    public void setCarImgId(Integer carImgId) {
        this.carImgId = carImgId;
    }
    public Integer getCayTypeId() {
        return cayTypeId;
    }

    public void setCayTypeId(Integer cayTypeId) {
        this.cayTypeId = cayTypeId;
    }
    public String getCarColor() {
        return carColor;
    }

    public void setCarColor(String carColor) {
        this.carColor = carColor;
    }
    public Integer getCarCardId() {
        return carCardId;
    }

    public void setCarCardId(Integer carCardId) {
        this.carCardId = carCardId;
    }
    public Integer getCarStatus() {
        return carStatus;
    }

    public void setCarStatus(Integer carStatus) {
        this.carStatus = carStatus;
    }
    public Float getCarDisplacement() {
        return carDisplacement;
    }

    public void setCarDisplacement(Float carDisplacement) {
        this.carDisplacement = carDisplacement;
    }
    public Integer getCarSeat() {
        return carSeat;
    }

    public void setCarSeat(Integer carSeat) {
        this.carSeat = carSeat;
    }
    public String getCarCase() {
        return carCase;
    }

    public void setCarCase(String carCase) {
        this.carCase = carCase;
    }
    public String getCarCharger() {
        return carCharger;
    }

    public void setCarCharger(String carCharger) {
        this.carCharger = carCharger;
    }
    public LocalDateTime getCreatetime() {
        return createtime;
    }

    public void setCreatetime(LocalDateTime createtime) {
        this.createtime = createtime;
    }
    public LocalDateTime getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(LocalDateTime updatetime) {
        this.updatetime = updatetime;
    }
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
    public String getOther1() {
        return other1;
    }

    public void setOther1(String other1) {
        this.other1 = other1;
    }
    public String getOther2() {
        return other2;
    }

    public void setOther2(String other2) {
        this.other2 = other2;
    }

    @Override
    public String toString() {
        return "Car{" +
                "carId=" + carId +
                ", carName=" + carName +
                ", carPrice=" + carPrice +
                ", carImgId=" + carImgId +
                ", cayTypeId=" + cayTypeId +
                ", carColor=" + carColor +
                ", carCardId=" + carCardId +
                ", carStatus=" + carStatus +
                ", carDisplacement=" + carDisplacement +
                ", carSeat=" + carSeat +
                ", carCase=" + carCase +
                ", carCharger=" + carCharger +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", version=" + version +
                ", other1=" + other1 +
                ", other2=" + other2 +
                "}";
    }
}
